<?php
 $username = mysql_real_escape_string($_POST['user']);
 $password = mysql_real_escape_string($_POST['pwd']);
 $mysqli=mysqli_connect('localhost','root','','test');
 $query = "SELECT * FROM MyUser WHERE FirstName='$username' AND Password='$password'";
 $result = mysqli_query($mysqli,$query)or die(mysqli_error());
 $num_row = mysqli_num_rows($result);
 $row=mysqli_fetch_array($result);
 if( $num_row >=1 ) {
 header("location:menu.html");
  echo 'true';
 }
 else{
 echo 'false';
 }
?>
